package com.lehoon.tomato.service.impl;

import com.lehoon.tomato.model.Bedroom;
import com.lehoon.tomato.model.Region;
import com.lehoon.tomato.model.School;
import com.lehoon.tomato.mapper.SchoolMapper;
import com.lehoon.tomato.model.vo.SchoolVo;
import com.lehoon.tomato.service.SchoolService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  学校服务实现类
 * </p>
 *
 * @author wang
 * @since 2020-09-23
 */
@Service
public class SchoolServiceImpl  implements SchoolService {

    @Resource
    private SchoolMapper schoolMapper;

    @Override
    public List<School> querySchool(SchoolVo schoolVo) {
        return schoolMapper.querySchool(schoolVo);
    }

    @Override
    public List<Region> getSchoolRegion(Integer schoolId) {
        return schoolMapper.getSchoolRegion(schoolId);
    }

    @Override
    public List<Bedroom> getSchoolBedroom(Integer schoolId, Integer regionId) {
        return schoolMapper.getSchoolBedroom(schoolId,regionId);
    }
}
